from celery import Celery

celeryapp = Celery(
    "async_task", # app.import_name, # async_task
    broker=f'redis://:{password}@192.168.2.172:6379/0',
    backend=f'redis://:{password}@192.168.2.172:6379/1',
    # include=["Celery_task.task_1","Celery_task.task_2"]
    )


# 通过autodiscover_tasks方法,传入需要查找的py软件包
# celery会自动查找软件包中的tasks文件(必须命名成tasks.py !!!!!)
cel.autodiscover_tasks(['celery_pro.sms', 'celery_pro.wechat', ])
